import http from '@/utils/http'
import {ImageGalleryInterface,FileClassifyTypeInterface,IsVisibleStatusInterface} from '@/api/gallery/types'


// 查询图片归档列表
// export function fileClassifyTypeList() {
//   return http.get<FileClassifyTypeInterface[]>('/admin/gallery/imageGallery/fileclassifytypeall')
// }

// 查询图片库列表
export function listImageGallery(fileClassifyTypeInterface : FileClassifyTypeInterface) {
  return http.get('/admin/gallery/imageGallery/list',fileClassifyTypeInterface)
}

// 查询图片库详细
export function getImageGallery(id: number | string) {
  return http.get<ImageGalleryInterface>('/admin/gallery/imageGallery/' + id)
}

// 新增图片库
export function addImageGallery(data :ImageGalleryInterface) {
  return http.post('/admin/gallery/imageGallery',data)
}

// 修改图片库(只包括id,sortorder)
export function updateImageGallery(id:number|string,sortOrder:number,fileClassifytype:String) {
  return http.put('/admin/gallery/imageGallery/'+id+'/'+sortOrder+'/'+fileClassifytype)
}

// 修改图片库(只包括id,sortorder)
export function delImageGallerybatch(ids:number[]|string[]) {
  return http.delete('/admin/gallery/imageGallery/'+ids)
}
